package com.syh.jn.scm.infrastructure.repository.model.stock.stockLoss;

import com.syh.core.ddd.infrastructure.repository.model.SuperBusinessModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "T_STOCK_STOCK_LOSS_ITEM")
@EqualsAndHashCode(callSuper = true)
public class StockLossItemModel extends SuperBusinessModel {
  /**
   * 对应报损单id
   */
  @Column(name = "LOSS_ORDER_ID", columnDefinition = "bigint COMMENT '对应报损单id'")
  private Long lossOrderId;
  /**
   * 库存商品ID
   */
  @Column(name = "STOCK_GOODS_ID", columnDefinition = "bigint COMMENT '库存商品ID'")
  private Long stockGoodsId;
  /**
   * 商品ID
   */
  @Column(name = "GOODS_ID", columnDefinition = "bigint COMMENT '商品ID'")
  private Long goodsId;
  /**
   * 商品名称
   */
  @Column(name = "GOODS_NAME", columnDefinition = "varchar(100) COMMENT '商品名称'")
  private String goodsName;
  /**
   * 商品编码
   */
  @Column(name = "CODE", columnDefinition = "varchar(50) COMMENT '商品编码'")
  private String code;
  /**
   * 所属种类,应用分类编码
   */
  @Column(name = "CATEGORY_CATALOG_CODE", columnDefinition = "varchar(50) COMMENT '所属种类,应用分类的父类目录'", length = 50)
  private String categoryCatalogCode;
  /**
   * 分类id
   */
  @Column(name = "CATEGORY_ID", columnDefinition = "bigint COMMENT '分类id'")
  private Long categoryId;
  /**
   * 分类名称
   */
  @Column(name = "CATEGORY_NAME", columnDefinition = "varchar(50) COMMENT '分类名称'")
  private String categoryName;
  /**
   * 品牌id
   */
  @Column(name = "GOODS_BRAND_ID", columnDefinition = "bigint COMMENT '品牌id'")
  private Long goodsBrandId;
  /**
   * 品牌名称
   */
  @Column(name = "GOODS_BRAND_NAME", columnDefinition = "varchar(50) COMMENT '品牌名称'")
  private String goodsBrandName;
  /**
   * 规格
   */
  @Column(name = "SPEC_NAME", columnDefinition = "varchar(50) COMMENT '规格'")
  private String specName;
  /**
   * 计量单位
   */
  @Column(name = "UNITS", columnDefinition = "varchar(50) COMMENT '计量单位'")
  private String units;
  /**
   * 与基础商品转换率（如果是基础商品 则等于1）
   */
  @Column(name = "CONVERSION_RATE", columnDefinition = "decimal(19,2) COMMENT '与基础商品转换率（如果是基础商品 则等于1）'")
  private BigDecimal conversionRate;
  /**
   * 报损数量
   */
  @Column(name = "QUANTITY", columnDefinition = "decimal(19,2) COMMENT '报损数量'")
  private BigDecimal quantity;
  /**
   * 商品平均单价
   */
  @Column(name = "AVERAGE_COST", columnDefinition = "decimal(19,6) COMMENT '商品平均单价'")
  private BigDecimal averageCost;
  /**
   * 备注
   */
  @Column(name = "REMARK", columnDefinition = "varchar(50) COMMENT '备注'")
  private String remark;
}
